import request from '/@/utils/request';

export async function queryRoles(params?: object) {
	return await request({
		url: '/role/get/pager',
		method: 'get',
		params,
	});
}
export async function queryRole(id?: any) {
	return await request({
		url: '/role/get/'+id+'',
		method: 'get'
	});
}
export async function getRoleMenus(params?: object) {
	return await request({
		url: '/role/get/role/menus',
		method: 'get',
		params
	});
}
export async function postRole(params?: object) {
	return await request({
		url: '/role/post/role',
		method: 'post',
		data:params
	});
}
export async function delRole(params?: object) {
	return await request({
		url: '/role/delete',
		method: 'delete',
		data:params
	});
}
export async function getMealsTree() {
	return await request({
		url: '/menu/get/menus/tree',
		method: 'get'
	});
}